package site.teamo.biu.net.common.constant;

import io.netty.channel.Channel;
import io.netty.handler.codec.http.HttpRequest;
import io.netty.util.AttributeKey;
import site.teamo.biu.net.common.util.HostPort;

/**
 * @author haocongshun
 * @date 2023/02/23 9:59:14
 */
public class ChannelAttributeKey {
    private ChannelAttributeKey() throws IllegalAccessException {
        throw new IllegalAccessException("ChannelAttributeKey does not support instantiation");
    }


    public static AttributeKey<Channel> TARGET_CHANNEL = AttributeKey.valueOf("TARGET_CHANNEL");

    //用于标记当前channel是不是用于https的连接
    public static AttributeKey<Boolean> IS_HTTPS = AttributeKey.valueOf("IS_HTTPS");

    //用于携带一个Http请求信息
    public static AttributeKey<HttpRequest> HTTP_REQUEST = AttributeKey.valueOf("HTTP_REQUEST");

    public static AttributeKey<HostPort> DESTINATION_INFO = AttributeKey.valueOf("DESTINATION_INFO");
}
